<me:UIFWB19 x:Class="WPFExcelReport.TFSHWB19X"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                   xmlns:ChartEx="clr-namespace:WPFExcelReport.Chart;assembly=ITXVIEWS"  
                   x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIFWB19.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:SDKEYCONV x:Key="sd"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIFWB19.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <TabControl Grid.Row="0" Grid.RowSpan="3"  Grid.Column="1" Grid.ColumnSpan="2">
            <TabItem Header="{Binding Source={Localization:Translate Word=疵点}}" >
                <Grid  >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="105"/>
                        <ColumnDefinition Width="105"/>
                        <ColumnDefinition Width="105"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="50"/>
                        <RowDefinition Height="50"/>
                        <RowDefinition Height="50"/>
                        <RowDefinition Height="50"/>
                        <RowDefinition Height="50"/>
                        <RowDefinition Height="50"/>
                    </Grid.RowDefinitions>

                    <SD:KB267 LMS="01" EKEY="{Binding EKEY,ElementName=TV}" FontSize="36"  Margin="5,0,0,0" Grid.Row="0" Grid.Column="0" Width="100" Height="45"/>
                    <SD:KB267 LMS="02" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="0" Grid.Column="1"  Width="100" Height="45"/>
                    <SD:KB267 LMS="03" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="0" Grid.Column="2"  Width="100" Height="45"/>
                    <SD:KB267 LMS="04" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="1" Grid.Column="0"  Width="100" Height="45"/>
                    <SD:KB267 LMS="05" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="1" Grid.Column="1"  Width="100" Height="45"/>
                    <SD:KB267 LMS="06" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="1" Grid.Column="2"  Width="100" Height="45"/>
                    <SD:KB267 LMS="07" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="2" Grid.Column="0"  Width="100" Height="45"/>
                    <SD:KB267 LMS="08" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="2" Grid.Column="1"  Width="100" Height="45"/>
                    <SD:KB267 LMS="09" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="2" Grid.Column="2"  Width="100" Height="45"/>
                    <SD:KB267 LMS="10" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="3" Grid.Column="0"  Width="100" Height="45"/>
                    <SD:KB267 LMS="11" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="3" Grid.Column="1"  Width="100" Height="45"/>
                    <SD:KB267 LMS="12" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="3" Grid.Column="2"  Width="100" Height="45"/>
                    <SD:KB267 LMS="13" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="4" Grid.Column="0"  Width="100" Height="45"/>
                    <SD:KB267 LMS="14" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="4" Grid.Column="1"  Width="100" Height="45"/>
                    <SD:KB267 LMS="15" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="4" Grid.Column="2"  Width="100" Height="45"/>
                    <SD:KB267 LMS="16" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="5" Grid.Column="0"  Width="100" Height="45"/>
                    <SD:KB267 LMS="17" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="5" Grid.Column="1"  Width="100" Height="45"/>
                    <SD:KB267 LMS="18" EKEY="{Binding EKEY,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="5" Grid.Column="2"  Width="100" Height="45"/>

                </Grid>
            </TabItem>
            <TabItem Header="{Binding Source={Localization:Translate Word=疵点记录}}">
                <DataGrid  Grid.Row="1"   
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   IsReadOnly="True"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"     
                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                   x:Name="dlgMaster"  
                   RowHeight="40"
                   RowDetailsVisibilityMode="Visible"  Margin="0,0,0,0"
                    >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=WBFVERSION}" Header="{Binding Source={Localization:Translate Word=版本}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBFFPOS}" Header="{Binding Source={Localization:Translate Word=序号}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBFFSCHL}" Header="{Binding Source={Localization:Translate Word=疵点/事件}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBFFSCHL,Converter={StaticResource sd},ConverterParameter=0267}" Header="{Binding Source={Localization:Translate Word=说明}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBFQPKT}" Header="{Binding Source={Localization:Translate Word=分值}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBFLGVON,Converter={StaticResource d1000}}" Header="{Binding Source={Localization:Translate Word=开始}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBFLGBIS,Converter={StaticResource d1000}}" Header="{Binding Source={Localization:Translate Word=结束}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBFBRTVON,Converter={StaticResource d1000}}" Header="{Binding Source={Localization:Translate Word=左起}}"  Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=WBFBRTBIS,Converter={StaticResource d1000}}" Header="{Binding Source={Localization:Translate Word=至}}"  Width="Auto" />
                    </DataGrid.Columns>
                </DataGrid  >
            </TabItem>
            <TabItem Header="{Binding Source={Localization:Translate Word=统计}}">
                <ChartEx:ChartEx0008   Name="Chart08" />
            </TabItem>
        </TabControl>
        <WrapPanel Grid.Row="0" Grid.Column="0">
            <WrapPanel>
                <TextBlock Text="{Binding Source={Localization:Translate Word=设定主疵点}}"/>
                <Button   Click="DFCommand" Height="40"  Margin="20,0,0,20" Width="40" VerticalAlignment="Center" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/color.png" />
                    </Button.Background>
                </Button>
                <Button   Click="DeleteCommand" Height="40"  Margin="20,0,0,20" Width="40" VerticalAlignment="Center" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Remove.png" />
                    </Button.Background>
                </Button>
                <Button   Click="SaveCommand" Height="40"  Margin="20,0,0,20" Width="40" VerticalAlignment="Center" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Save.png" />
                    </Button.Background>
                </Button>
          
            </WrapPanel>
        </WrapPanel>
        <Grid   Grid.Row="2" Grid.Column="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="100"></ColumnDefinition>
                <ColumnDefinition Width="180"></ColumnDefinition>
                <ColumnDefinition Width="100"></ColumnDefinition>
                <ColumnDefinition Width="100"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Button  Grid.Row="1" Grid.Column="1"  Margin="20,0,0,20" FontSize="22" Content="{Binding Source={Localization:Translate Word=疵点:}}" />
            <SD:K0267 Grid.Row="1" Grid.Column="2"  FontSize="22" Width="180"
                              IsEdit="{Binding IsEdit,ElementName=TV}"
                              EXAUF="{Binding EKEY,ElementName=TV}"
                              KEY="{Binding EKEY,ElementName=TV}"  />
            <Button  Grid.Row="1" Grid.Column="3" Margin="20,0,0,20" FontSize="22" Content="{Binding Source={Localization:Translate Word=分值:}}"/>
            <ex:NumericBox  Grid.Row="1" Grid.Column="4" Margin="20,0,0,20"  FontSize="42" Text="{Binding WBFQPKT}" Maximum="4" Width="40" />
            <WrapPanel Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3">
                <SD:KB9317 LMS="1" KEY="{Binding WBFQPKT,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="0" Grid.Column="0"/>
                <SD:KB9317 LMS="2" KEY="{Binding WBFQPKT,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="0" Grid.Column="0"/>
                <SD:KB9317 LMS="3" KEY="{Binding WBFQPKT,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="0" Grid.Column="0"/>
                <SD:KB9317 LMS="4" KEY="{Binding WBFQPKT,ElementName=TV}"  Margin="5,0,0,0" Grid.Row="0" Grid.Column="0"/>
            </WrapPanel>
         
            <Button   Grid.Row="2" Grid.Column="4" Click="NewCommand" Height="40"    Width="40" VerticalAlignment="Center" >
                <Button.Background>
                    <ImageBrush  ImageSource="/ImagePackage;component/Images/button_ok.png" />
                </Button.Background>
            </Button>
            <Button  Grid.Row="3" Grid.Column="1" FontSize="22" Margin="20,0,0,20" Content="{Binding Source={Localization:Translate Word=开始}}" Click="StartError"/>
            <ex:NumericBox  Grid.Row="3" Grid.Column="2"   FontSize="32" Text="{Binding WBFLGVON,Converter={StaticResource d1000}}" Width="100" />
            <Button   Grid.Row="3" Grid.Column="3"  Margin="20,0,0,20" FontSize="22" Content="{Binding Source={Localization:Translate Word=结束}}"  Click="EndError"/>
            <ex:NumericBox  Grid.Row="3" Grid.Column="4"  FontSize="32" Text="{Binding WBFLGBIS,Converter={StaticResource d1000}}" Width="100" />
            <Button   Grid.Row="4" Grid.Column="1"  Margin="20,0,0,20" FontSize="22" Content="{Binding Source={Localization:Translate Word=左起}}"/>
            <ex:NumericBox  Grid.Row="4" Grid.Column="2" FontSize="32" Text="{Binding WBFBRTVON,Converter={StaticResource d1000}}" Width="100" />
            <Button   Grid.Row="4" Grid.Column="3" Margin="20,0,0,20" FontSize="22" Content="{Binding Source={Localization:Translate Word=左至}}"/>
            <ex:NumericBox  Grid.Row="4" Grid.Column="4" FontSize="32" Text="{Binding WBFBRTBIS,Converter={StaticResource d1000}}"  Width="100"/>
        </Grid>
        <!--<SD:KL267 Grid.Row="0"  Grid.RowSpan="3" Grid.Column="2"  IsCombo="False"
                  KEY="{Binding EKEY,ElementName=TV}"
                  />-->
       
    </Grid>
</me:UIFWB19>
